import { createBrowserRouter } from 'react-router-dom';
import { Layout } from '@/pages/layout/layout';
import { Month } from '@/pages/month/month';
import { Year } from '@/pages/year/year';
import { NewInfo } from '@/pages/newInfo/newInfo';
import { Error404 } from '@/pages/404/404';

const router = createBrowserRouter([
  {
    path: '/',
    element: <Layout />,
    // element: <Navigate to={'month'} />,
    children: [
      {
        path: 'month',
        element: <Month />,
      },
      {
        path: 'year',
        element: <Year />,
      },
    ],
  },
  {
    path: '/newInfo',
    element: <NewInfo />,
  },
  {
    path: "*",
    element: <Error404 />
  }
]);

export default router;
